(function($){"use strict";UNCODE.bgChanger=function(){var $bg_changers=$(".vc_row[data-bg-changer]:visible"),$bg_first=$(".vc_row[data-bg-remove]"),bg_remove=$bg_first.attr("data-bg-remove"),$first=$bg_changers.first(),$last=$bg_changers.last(),$bg_wrapper=$("#changer-back-color"),$bg_changings=$("div[data-bg-changing]",$bg_wrapper),setCTA,localH=UNCODE.wheight,isScrolling;$bg_first.removeClass(bg_remove);var bgChange=function($col,bgColor,skin,tmbskin){$bg_wrapper.attr("class",bgColor);var menuskin;typeof skin!="undefined"&&(menuskin=skin.replace("style","menu")),$col.length&&($(".uncol[data-skin-change]").each(function(){var $isoFooter=$(".isotope-footer",this);$(this).add($isoFooter).removeClass("style-dark").removeClass("style-light").addClass(skin),menuskin!==""&&$(this).find(".isotope-filters:not(.with-bg)").removeClass("menu-dark").removeClass("menu-light").addClass(menuskin)}),$(".tmb[data-skin-change]").each(function(){$(this).removeClass("tmb-dark").removeClass("tmb-light").addClass(tmbskin)}))},$masthead=$("#masthead"),transDesktop,transMobile,changeSkin,checkTransparencyAndChange=function(skin){transDesktop=$masthead.hasClass("menu-desktop-transparent")&&UNCODE.wwidth>=UNCODE.mediaQuery,transMobile=$masthead.hasClass("menu-mobile-transparent")&&UNCODE.wwidth200?-100:clH*-0.5;return wH/2-clH}}))}),$("body").addClass("bg-changer-init"))},body=document.body,edges=!1,throttle=function(fn,wait){var time=Date.now();return function(){time+wait-Date.now()<0&&(fn(),time=Date.now())}},$wrapper=document.querySelector(".main-wrapper"),currentPixel=window.pageYOffset||window.document.documentElement.scrollTop,$title=document.querySelector("#rotating");$title!==null&&($title.style.whiteSpace="nowrap",$title.style.transition="transform 200ms linear"),window.addEventListener("scroll",throttle(function(){window.clearRequestTimeout(isScrolling),isScrolling=requestTimeout(function(){var scrolled=window.pageYOffset||window.document.documentElement.scrollTop,body=document.body,html=document.documentElement,docH=Math.max(body.scrollHeight,body.offsetHeight,html.clientHeight,html.scrollHeight,html.offsetHeight),$row=!1,firstOff,lastOff;if(scrolled<100&&$first.length){firstOff=$first.offset().top;if(firstOff<100)var $row=$first}else if(scrolled+UNCODE.wheight>docH-100&&$last.length){lastOff=$last.offset().top+$last.outerHeight();if(lastOff>docH-100)var $row=$last}if($row.length){var $col=$(".uncol[data-skin-change]",$row).eq(0),skin,$tmbs,tmbskin,bgColor=$row.attr("data-bg-color");$col.length&&(skin=$col.attr("data-skin-change"),$tmbs=$(".tmb[data-skin-change]",$row),tmbskin=skin.replace("style","tmb")),bgChange($col,bgColor,skin,tmbskin),checkTransparencyAndChange(skin),edges=!0}},150),edges===!0&&(bg_waypoints(),Waypoint.refreshAll(),edges=!1)},100),!1),$(window).on("resize",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(function(){localH!=UNCODE.wheight&&(localH=UNCODE.wheight,bg_waypoints(),Waypoint.refreshAll())},100)}),bg_waypoints()}})(jQuery)